<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="/wolive.ico"/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>在线客服系统登录</title>
    {load href="__libs__/layui/css/layui.css"/}
    {load href="__libs__/jquery/jquery.min.js"/}
    {load href="__libs__/layui/layui.js"/}
    <link rel="stylesheet" type="text/css" href="__style__/admin/login.css?v=1.9">
</head>

<body>
<div class="main">
    <form class="layui-form" action="{$submit}" method="post">
        <div class="layui-form-item">
            <h2>登录客服系统</h2>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="text" name="username" required lay-verify="required" placeholder="用户名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block layui_callback_32383637303234363930">
                <input type="password" name="password" required lay-verify="required" placeholder="密码" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="loginForm">立即提交</button>
            </div>
        </div>
        <div class="layui-form-item">
            <a href="{:url('admin/login/sign')}">没有账号？点击注册</a>
        </div>
    </form>
</div>

<script>
    //Demo
    layui.use('form', function () {
        var form = layui.form;
        //监听提交
        form.on('submit(loginForm)', function (data) {
            $.ajax({
                type: "post",
                url: data.form.action,
                data: data.field,
                dataType: 'json',
                success: function (res) {
                    if (res.code == 1) {
                        location.href = res.url;
                    } else {
                        layui.layer.msg(res.msg);
                    }
                }
            });
            return false;
        });
    });


</script>
{if !$mobile}
<div class="footer"><a href="https://www.wolive.cc" target="_blank">客服系统</a></div>
{/if}
</body>
</html>

